Measurement of surface roughness in general is difficult, and measurement of the roughness of smooth surfaces and especially of wooden surfaces is both awkward and inaccurate. The problem arising in roughness measurement of wooden surfaces is caused among other things by the fact that, unlike any other material, the roughness of wood consists partly of surface hirsuteness generated by loose wooden fibres, U.S. Pat. No. 6,122,065 describes an arrangement in which the topology of an object, such as the surface of a piece of wood, is inspected using a camera and monochromatic laser light, and the surface profile is determined utilising the triangulation based derivation method. This arrangement aims at localisation of cavities, wane and other missing material. In addition, this reference combined with the procedure mentioned above allows for colour analysis of the wooden surface using either two LEDs of different colours, which consequently emit light on two wavelengths, or wideband light together with spectroanalysis. This part of the arrangement searches other issues than shape deficiencies. The procedure of the reference is not capable of measuring surface roughness in the form of hirsuteness, but only major shape deficiencies, as it appears from the reference itself. Patent specifications U.S. Pat. Nos. 4,290,698, 4,878,114, 5,229,835 and CA-1078489 describe similar methods for measuring surface roughness by directing a narrow light beam to the surface to be inspected, by receiving the light reflected by said surface by means of an optoelectronic detector moved in parallel with the surface, and by calculating values corresponding to the surface roughness on the electric signal obtained. In all of these references, surface undulation is regarded as surface roughness. Surface undulation results in the grazing angle of the reflected beam relative to the mean normal to the surface varying in accordance of the current angle of inclination of the surface, and then the amount of light reflected at a given angle also varies and is measurable. These methods are hence statistic methods as well, in other words, they calculate the standard deviation, root mean squares or the like, and the quantity of microundulation of the surface is derived from these. FR patent specification 2 710 405 depicts a method for quantitative determination of the roughness of a wooden surface by using measurement of the frictional energy of a rotating feeler. This is hence a mechanical probe, which is inappropriate for comprehensive inspection of large amounts of timber, and especially for inspection of surface roughness distributions with respect to all the timber passing through a production line.